//
//  DetailView.m
//  11111
//
//  Created by lanou3g on 15/10/29.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "DetailView.h"
@interface DetailView ()

@property (nonatomic, assign) CGFloat selfWidth;

@property (nonatomic, assign) CGFloat selfHeight;

@end

@implementation DetailView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _selfWidth = frame.size.width;
        _selfHeight = frame.size.height;
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews
{
    // 大图片
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10 * kWidth, 0, kScreenWidth - 20 * kWidth, 300 * kHeight)];
    self.imageView.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.imageView];
    
    // 标题label
    self.titleLB = [[UILabel alloc] initWithFrame:CGRectMake(40 * kWidth, 320 * kHeight, 80 * kWidth, 30 * kHeight)];
    self.titleLB.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.titleLB];
    // 标题textfile
    self.titleTF = [[UILabel alloc] initWithFrame:CGRectMake(120 * kWidth, 320 * kHeight, 200 * kWidth, 30 * kHeight)];
    self.titleTF.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.titleTF];
    
    // 影响label
    self.effectLB = [[UILabel alloc] initWithFrame:CGRectMake(40 * kWidth, 360 * kHeight, 80 * kWidth, 30 * kHeight)];
    self.effectLB.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.effectLB];
    // 影响textfile
    self.effectTF = [[UILabel alloc] initWithFrame:CGRectMake(120 * kWidth, 360 * kHeight, 200 * kWidth, 30 * kHeight)];
    self.effectTF.backgroundColor = [UIColor whiteColor ];
    [self addSubview:self.effectTF];
    
    // 分类label
    self.cateLB = [[UILabel alloc] initWithFrame:CGRectMake(40 * kWidth, 400 * kHeight, 80 * kWidth, 30 * kHeight)];
    self.cateLB.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.cateLB];
    // 分类textfile
    self.cateTF = [[UILabel alloc] initWithFrame:CGRectMake(120 * kWidth, 400 * kHeight, 200 * kWidth, 30 * kHeight)];
    self.cateTF.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.cateTF];
    
    // 原料label
    self.yuanliaoLB = [[UILabel alloc] initWithFrame:CGRectMake(40 * kWidth, 440 * kHeight, 80 * kWidth, 30 * kHeight)];
    self.yuanliaoLB.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.yuanliaoLB];
    // 原料textfile
    self.yuanliaoTF = [[UILabel alloc] initWithFrame:CGRectMake(120 * kWidth, 440 * kHeight, 200 * kWidth, 30 * kHeight)];
    self.yuanliaoTF.backgroundColor = [UIColor whiteColor];
    self.yuanliaoTF.numberOfLines = 0;
    self.yuanliaoTF.font = [UIFont systemFontOfSize:18];
    [self addSubview:self.yuanliaoTF];
    
    // 营养label
    self.yingyangLB = [[UILabel alloc] initWithFrame:CGRectMake(40 * kWidth, self.yuanliaoLB.bottom + 20 * kHeight, 80 * kWidth, 30 * kHeight)];
    self.yingyangLB.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.yingyangLB];
    // 营养textfile
    self.yingyangTF = [[UILabel alloc] initWithFrame:CGRectMake(120 * kWidth, self.yuanliaoTF.bottom + 20 * kHeight, 200 * kWidth, 30 * kHeight)];
   // self.yingyangTF.font = [UIFont systemFontOfSize:18];
    self.yingyangTF.numberOfLines = 0;
    self.yingyangTF.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.yingyangTF];
    
    
    
}



@end






